<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>模块信息列表</title>
		<script src="js/global.js"></script>
	</head>

	<body>
		
		<div style="height: 40px;"><h2>系统所有模块</h2></div>
		<!--树的容器 -->
		<div id="test1"></div>
		
		<!-- 脚本代码部分 -->
		<script>
			layui.use(['form', 'layer', 'table','tree'], function() {
				var form = layui.form;
				var table = layui.table;
				var layer = layui.layer;
				var $ = layui.$;
				var tree = layui.tree;
				//向服务端发送请求
				$.post(globalData.server + "module/getModuleTree?token=" + globalData.getToken(), function(res) {
					//渲染
					var inst1 = tree.render({
						elem:'#test1',//绑定元素
						data:res,//将结果渲染在页面
						edit:['add','update','del']
					});
				})

			});
		</script>
	</body>

</html>